package com.jjtm.common.core.expections;


import com.jjtm.common.core.constants.ErrorConstants;

/**
 * 
 * @author wangbaofeng
 *
 */
public class BussinessException extends RuntimeException {

	private static final long serialVersionUID = 5424538975007907683L;

	private String code;
	private String message;

	public BussinessException() {
		super();
	}

	public BussinessException(String code, String msg) {
		super(msg);
		this.message = msg;
		this.code = code;
	}

	public BussinessException(String msg) {
		super(msg);
		this.code = ErrorConstants.BUG_ERR;
		this.message = msg;
	}

	public BussinessException(Throwable cause) {
		super(cause);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
